'use strict';


module.exports = app => {
  const { router, controller } = app;// 结构

  const url = '/api/mall/pc-web/cart'; // 开启路由前缀


  router.delete(`${url}`, controller.mall.pcWeb.cart.destroy);// 删除接口
  router.post(`${url}/selectAll`, controller.mall.pcWeb.cart.selectAll);// 全选
  router.post(`${url}/unselectAll`, controller.mall.pcWeb.cart.unselectAll);// 取消全选
  router.get(`${url}/total`, controller.mall.pcWeb.cart.totalCarts);// 获取购物车总数量
  router.resources(`${url}`, controller.mall.pcWeb.cart); // 增 改 查

};
